package com.minimalist.common.entity.lindi.vo.tradeapplicationtemplateconfirmletter;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.config.mybatis.bo.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "林地指标交易平台_交易申请确认函模板查询实体")
public class LindiTradeApplicationTemplateConfirmLetterQueryVO extends PageReq implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "templateConfirmLetterId", description = "确认函模板ID", type = "string")
    private Long templateConfirmLetterId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "tradeApplicationId", description = "交易申请ID", type = "string")
    private Long tradeApplicationId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "contractTemplateId", description = "合同模板ID", type = "string")
    private Long contractTemplateId;

    @Schema(name = "confirmLetterType", description = "确认函类型", type = "string")
    private String confirmLetterType;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "fileId", description = "文件ID", type = "string")
    private Long fileId;

    public LindiTradeApplicationTemplateConfirmLetterQueryVO(){
        super();
    }

    public LindiTradeApplicationTemplateConfirmLetterQueryVO(Long pageNum, Long pageSize){
        super(pageNum, pageSize);
    }

    public LindiTradeApplicationTemplateConfirmLetterQueryVO(Long pageNum, Long pageSize, Long templateConfirmLetterId, Long tradeApplicationId, Long contractTemplateId, String confirmLetterType, Long fileId){
        super(pageNum, pageSize);
        this.templateConfirmLetterId = templateConfirmLetterId;
        this.tradeApplicationId = tradeApplicationId;
        this.contractTemplateId = contractTemplateId;
        this.confirmLetterType = confirmLetterType;
        this.fileId = fileId;
    }

    public Long getTemplateConfirmLetterId(){
        return templateConfirmLetterId;
    }

    public void setTemplateConfirmLetterId(Long templateConfirmLetterId){
        this.templateConfirmLetterId = templateConfirmLetterId;
    }

    public Long getTradeApplicationId(){
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId){
        this.tradeApplicationId = tradeApplicationId;
    }

    public Long getContractTemplateId(){
        return contractTemplateId;
    }

    public void setContractTemplateId(Long contractTemplateId){
        this.contractTemplateId = contractTemplateId;
    }

    public String getConfirmLetterType(){
        return confirmLetterType;
    }

    public void setConfirmLetterType(String confirmLetterType){
        this.confirmLetterType = confirmLetterType;
    }

    public Long getFileId(){
        return fileId;
    }

    public void setFileId(Long fileId){
        this.fileId = fileId;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        LindiTradeApplicationTemplateConfirmLetterQueryVO that = (LindiTradeApplicationTemplateConfirmLetterQueryVO) o;
        if (!Objects.equals(templateConfirmLetterId, that.templateConfirmLetterId)){
            return false;
        }
        if (!Objects.equals(tradeApplicationId, that.tradeApplicationId)){
            return false;
        }
        if (!Objects.equals(contractTemplateId, that.contractTemplateId)){
            return false;
        }
        if (!Objects.equals(confirmLetterType, that.confirmLetterType)){
            return false;
        }
        return Objects.equals(fileId, that.fileId);
    }

    @Override
    public int hashCode(){
        int result = super.hashCode();
        result = 31 * result + (templateConfirmLetterId != null ? templateConfirmLetterId.hashCode() : 0);
        result = 31 * result + (tradeApplicationId != null ? tradeApplicationId.hashCode() : 0);
        result = 31 * result + (contractTemplateId != null ? contractTemplateId.hashCode() : 0);
        result = 31 * result + (confirmLetterType != null ? confirmLetterType.hashCode() : 0);
        result = 31 * result + (fileId != null ? fileId.hashCode() : 0);
        return result;
    }
}
